import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';

import './my.css'
const Index = () => {
  
    let arr = JSON.parse(sessionStorage.getItem('data'))||'[]'
   
    console.log(arr);

    const navigate = useNavigate();
    return <div className='my-box' >
        <div className='my-head'>
            <div className='my-tou'>
               
              
                <span style={{fontSize:'20px', color:'white', marginLeft:'20px'}}>我的</span>
                <span style={{marginLeft:'270px'}} onClick={()=>{navigate('/shez')}}><img src={require('./img/设置-白色.png')}></img></span>

            </div>
            <div className='my-xi'>
           
                      <img src={require('./img/头像.png')}></img>
                      <p className='xi-zi' style={{fontSize:'20px'}}>{arr.usedata[0].usename}</p>
                      <p className='xi-zhu' onClick={()=>{navigate('/app/my/dong')}}>个人主页</p>
                  </div>
              
        </div>
        <div className='my-main'>
            <div className='my-shou' onClick={()=>{navigate('/app/my/shouc')}}>
                <img src={require('./img/收藏.png')}></img>
                <p>我的收藏</p>
                <span>{'>'}</span>
            </div>
            <div className='my-shou'
            onClick={()=>{navigate('/app/my/shenfen')}}
            >
                <img src={require('./img/身份证.png')}></img>
                <p>身份认证</p>
                <span>{'>'}</span>
            </div>
            <div className='my-shou'
            onClick={()=>{navigate('/app/my/guanyu')}}
            >
                <img src={require('./img/关于我们.png')}></img>
                <p>关于我们</p>
                <span>{'>'}</span>
            </div>
        </div>
    </div>;
}



export default Index;